import csv
import numpy as np
import matplotlib.pyplot as plt
import numpy.fft as fft
with open('out.csv', 'rb') as f:
    reader = csv.reader(f)
    length = 1
    signals = np.empty([0 , length], dtype = complex)
    p = 0
    
    for row1 in reader:
        row2 = reader.next()
        length = min(len(row1), len(row2))
        
        shape = np.shape(signals)
        shape = [shape[0] + 1, length]
        signals.resize(shape);
        
        for index in range(0, length):
            signals[p][index] = complex(row1[index]) + complex(0, 1) * complex(row2[index])
        
        p = p + 1
    
    print signals
    plt.plot(signals[0])
    plt.plot(signals[1])
    plt.show()
    #print density
